package com.stevens.triangles;

/**
 * Base class which defines all operations that a Triangles program should have,
 * in addition to defining the standard error and output messages.
 *
 */
public abstract class TrianglesBase {
	
	// String constants used to standardize output of derived class methods
	public final static String kTooFewSidesError = "ERROR: Not enough sides. A triangle has >> 3 << sides.";
	public final static String kTooManySidesError = "ERROR: Too many sides. Remember, a triangle has >> 3 << sides.";
	public final static String kTwoDistinctEqualPairsError = "ERROR: Triangle has 2 distinct pairs of equal sides, which should never happen.";
	public final static String kInvalidSideError = "ERROR: At least one side is of invalid length (0 or negative).";
	public final static String kInvalidTriangleError = "ERROR: The specific triangle is invalid (fails to meet A + B > C)";
	
	public final static String kScaleneTriangle = "Scalene Triangle";
	public final static String kScaleneRightTriangle = "Scalene Right Triangle";
	public final static String kIsoscelesTriangle = "Isosceles Triangle";
	public final static String kIsoscelesRightTriangle = "Isosceles Right Triangle";
	public final static String kEquilateralTriangle = "Equilateral Triangle";
	
	
	/** holds lengths of a triangle **/
	protected double[] triangleSides;
	
	/**
	 * constructor that initializes the triangle sides
	 * @param triangleSides - lengths of a triangle to store in this object
	 */
	public TrianglesBase(double[] triangleSides) {
		this.triangleSides = triangleSides;
	}
	
	/**
	 * Calculate the kind of triangle specified by this object, and return a string describing it.
	 * @return a string describing the kind of triangle specified by this object
	 */
	public abstract String kindOfTriangle();
	
}
